CREATE TABLE [dbo].[Vouchers]
(
[Id] [int] NOT NULL IDENTITY(1, 1),
[PIN] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[SerialNo] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Value] [decimal] (18, 0) NULL,
[IsUsed] [bit] NULL,
[DateUsed] [datetime] NULL,
[DateGenerated] [datetime] NULL,
[Timestamp] [datetime] NULL,
[AccountId] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Vouchers] ADD CONSTRAINT [PK_Vouchers] PRIMARY KEY CLUSTERED  ([Id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Vouchers] ADD CONSTRAINT [FK_Vouchers_Account] FOREIGN KEY ([AccountId]) REFERENCES [dbo].[Accounts] ([Id])
GO
